Note: This statement is not available in the Add Statement dialog box or the Statements pane.
Removes a property from a JSONObject and returns True or False to indicate if it was successfully removed.
Syntax
RemoveProperty("PropertyName")
Arguments
| Argument | Description |
|---|---|
| PropertyName | Property to remove. |
Supported objects
Return value
| Value | Description |
|---|---|
| True | Property was removed. |
| False | Property was not removed. |
Example
jsonObject = JSONNewObject()
' Adds values to JSONObject
jsonObject.SetValue("PropertyName1", 1)
jsonObject.SetValue("PropertyName2", 2)
' Returns False
boolVal = jsonObject.RemoveProperty("PropertyName3")
PrintLn("Should be False: " & boolVal)
' Returns True
boolVal = jsonObject.RemoveProperty("PropertyName1")
PrintLn("Should be True: " & boolVal)